package com.thirteen.app.service;

import com.thirteen.app.dto.Judge.ExamRecordList;
import com.thirteen.app.dto.JudgeSubjectiveResquest.JudgeByPersonDto;
import com.thirteen.app.dto.PaperWithAnswerResponse.UnJudgedDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExamRecordService {

    //    插入一条记录
    Integer insertRecord(Integer examId, Integer userId);

    //    检查是否能开启新的考试
    Boolean canOpenNewExam(Integer examId, Integer userId);

    //    检查是否能再次考试
    Boolean canRedoExam(Integer examId, Integer userId);

    //    查看我的试卷时，能否看到答案和解析
    Boolean canBrowseAnswerAndAnalysiis(@Param("examRecordId") Integer examRecordId);

    //    是否第一次参加
    Boolean isFirstAttend(Integer examId, Integer userId);

    //    阅卷结束,更新成绩
    void updateScore(JudgeByPersonDto judgeByPersondDto);

    //    查询某次考试所有试卷
    List<ExamRecordList> queryAllByExamId(Integer examId,String realName);

    //wc
    //   获取阅卷未完成考试的考试记录
    List<UnJudgedDto> queryAllUnJudgeByExamId(Integer examId, Integer userId);

}
